AOP Support for C#

نویسندگان

  • M. Devi Prasad
  • B. D. Chaudhary
چکیده

We have extended the C# compiler available under Microsoft’s Shared Source Common Language Infrastructure (SSCLI) to facilitate Aspect Oriented Programming. The resulting compiler targets Microsoft .NET architecture. Our implementation introduces new ideas into the aspect language and the aspect-weaving mechanism. Our AOP extensions emulate AspectJ programming model and augment it with constructs that harness facilities provided by the Microsoft’s .NET architecture. In particular, our framework allows aspect definitions to introduce ‘attributes’ on base C# module elements. This allows .NET runtime to provide container services transparently to marked modules and module elements. Our aspect weaver brings novelty to the weaving phase. It allows configurable aspect ordering and selective aspect weaving. Selecting aspects of interest from a set of defined aspects and specifying suitable physical order for advice weaving is externalized in an XML file. Aspect scheduler determines a weave plan based on this specification and the weaver carries out this plan. Modifications to the original compiler involved reorganizing the source code so that we obtain better modularization promoting reuse, or reduce coupling with the base code. In some cases, we extracted classes used as implementation helpers in the base compiler and turned them into new reusable abstractions. In order to implement efficient traversals between abstract syntax graph and a graph representing semantics-verified method bodies, we had to extend data structures for syntax and method-body graphs. The solution introduced cyclic references across graphs. Therefore, we had to define new protocols for memory management so that these graphs representing method bodies are preserved even after their semantic checking. We altered the memory ownership scheme so that the base compiler and our extension subsystem coordinate memory management concerns. Current (incomplete) implementation is around 2 thousand lines of C++ code over and above Microsoft’s base compiler code. This implementation performs only a source to source translation. It has taken about four months for four people to make stable extensions. There is no public release of the implementation available as yet.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Advances in AOP with AspectC++1

Often declared dead or at least dying, C/C++ is still the lingua franca of many application domains. Aspect-Oriented Programming (AOP) is a programming paradigm that supports the modular implementation of crosscutting concerns. Thereby, AOP improves the maintainability, reusability, and configurability of software in general. Although already popular in the Java domain, AOP is still not commonl...

متن کامل

The design and implementation of AspectC + + q

Aspect-Oriented Programming (AOP) is a programming paradigm that supports the modular implementation of crosscutting concerns. Thereby, AOP improves the maintainability, reusability, and configurability of software in general. Although already popular in the Java domain, AOP is still not commonly used in conjunction with C/C++. For a broad adoption of AOP by the software industry, it is crucial...

متن کامل

AspectC++ – An AOP Extension for C++

More and more software developers get in touch with aspect-oriented programming (AOP). By providing means to modularize the implementation of crosscutting concerns, it stands for more reusability, less coupling between modules, and better separation of concerns in general. Today, solid tool support for AOP is available, for instance, by JBoss (JBoss AOP), BEA (AspectWerkz), and IBM (AspectJ and...

متن کامل

Debugging Aspect-Enabled Programs

The ability to debug programs composed using aspect-oriented programming (AOP) techniques is critical to the adoption of AOP. Nevertheless, many AOP systems lack adequate support for debugging, making it difficult to diagnose faults and understand the program‘s composition and control flow. We present an AOP debug model that characterizes AOP-specific program composition techniques and AOP-spec...

متن کامل

A Program Transformation Technique to Support AOP within C++ Template

Aspect-oriented programming (AOP) provides assistance in modularizing concerns that crosscut the boundaries of system decomposition. Aspects have the potential to interact with many different kinds of language constructs in order to modularize crosscutting concerns. Although several aspect languages have demonstrated advantages in applying aspects to traditional modularization boundaries (e.g.,...

متن کامل

A Flight Deck Decision Support Tool for Autonomous Airborne Operations

NASA is developing a flight deck decision support tool to support research into autonomous operations in a future distributed air/ground traffic management environment. This interactive real-time decision aid, referred to as the Autonomous Operations Planner (AOP), will enable the flight crew to plan autonomously in the presence of dense traffic and complex flight management constraints. In ass...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003